home *** CD-ROM | disk | FTP | other *** search
/ Technotools / Technotools (Chestnut CD-ROM)(1993).ISO / lang_c / cug172 / impure.c < prev    next >
C/C++ Source or Header  |  1986-02-05  |  2KB  |  86 lines

  1. /*
  2.   HEADER: CUG     nnn.nn;
  3.   TITLE:     LEX - A Lexical Analyser Generator
  4.   VERSION:     1.0 for IBM-PC
  5.   DATE:      Jan 30, 1985
  6.   DESCRIPTION:     A Lexical Analyser Generator. From UNIX
  7.   KEYWORDS:     Lexical Analyser Generator YACC C PREP
  8.   SYSTEM:     IBM-PC and Compatiables
  9.   FILENAME:      IMPURE.C
  10.   WARNINGS:     This program is not for the casual user. It will
  11.          be useful primarily to expert developers.
  12.   CRC:         N/A
  13.   SEE-ALSO:     YACC and PREP
  14.   AUTHORS:     Scott Guthery 11100 leafwood lane Austin, TX 78750
  15.   COMPILERS:     DESMET-C
  16.   REFERENCES:     UNIX Systems Manuals
  17. */
  18. /*
  19.  * impure.c  -- Impure data for ytab.c and min.c
  20.  *
  21.  * Created 02-Dec-80 Bob Denny -- Impure data from ytab.c and min.c moved
  22.  *                                     here so they can reside in overlays.
  23.  * More    19-Mar-82 Bob Denny -- New C library & compiler
  24.  * More       20-Nov-83 Scott Guthery -- Adapt for IBM PC & DeSmet C    
  25.  */
  26.  
  27. #include <stdio.h>
  28. #include "lexlex.h"
  29. #include "ytab.h"
  30.  
  31. /*
  32.  * min's
  33.  */
  34. struct set **oldpart;
  35. int **newpart;
  36. int nold;
  37. int nnew;
  38.  
  39. /*
  40.  * ytab's
  41.  */
  42.  
  43. struct nlist {
  44.         struct  nlist   *nl_next;
  45.         struct  nfa     *nl_base;
  46.         struct  nfa     *nl_end;
  47.         struct  nfa     *nl_start;
  48.         struct  nfa     *nl_final;
  49.              } *nlist;
  50.  
  51. #ifndef YYSTYPE
  52. #define YYSTYPE int
  53. #endif
  54.  
  55. YYSTYPE yyval = 0;
  56. YYSTYPE *yypv;
  57. YYSTYPE yylval = 0;
  58.  
  59. int nlook = 0;
  60. int yyline = 0;
  61. char *breakc;
  62. char *ignore;
  63. char *illeg;
  64.  
  65. char buffer[150];
  66. int str_length;
  67.  
  68. char ccl[(NCHARS+1)/NBPC];
  69.  
  70. /*
  71.  * Copied from ytab.c just before yyparse() ... kludgy.
  72.  */
  73. #define YYMAXDEPTH 150
  74.  
  75. /*
  76.  * These are impure data for the parser driver yyparse().
  77.  */
  78.  
  79. int yydebug = 0;                /* Make this 1 for yyparse() debugging  */
  80. YYSTYPE yyv[YYMAXDEPTH];
  81. int yychar = -1;
  82.  
  83. int yynerrs = 0;
  84. int yyerrflag = 0;
  85.  
  86.